<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>前期沟通-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<link rel="stylesheet" href="__PUBLIC__/mobile/css/mobiscroll.min.css">
</head>
<body style="background: #f3f3f3;">
<div class="header">
    <a class="menu_btn" href="javascript:;"><span class="sp1"></span><span class="sp2"></span><span class="sp3"></span></a>
	前期沟通<a href="__APP__/Mobile/Project/project_communicate/id/{$project['id']}" class="header_txt_btn">取消</a>
</div>
<include file="Include:commu_menu" />
<div class="content">
    <div class="communicate_add" style="padding-bottom:64px;">
        <form name="number_validate">
            <div class="data paddbox">
                <div><input type="text" id="data" name="data" readonly value="日期"></div>
            </div>
            <form>
            <div class="form_item">
                <div class="form_item_tit">
                    工作类别
                </div>
                <div class="form_item_box label_box">
                    <label class="form_label w30b radio"><input type="radio" name="work_type" value="电话沟通">电话沟通</label><label class="form_label w30b radio"><input type="radio" name="work_type" value="发送资料">发送资料</label><label class="form_label w30b radio"><input type="radio" name="work_type" value="接收资料">接收资料</label><label class="form_label w30b radio"><input type="radio" name="work_type" value="商务简报">商务简报</label><label class="form_label w30b radio"><input type="radio" name="work_type" value="邮件沟通">邮件沟通</label>
                </div>
                <div class="form_item_tit">
                    备注
                </div>
                <div class="form_item_box label_box">
                    <div class="form_sub_tit">
                        发送资料
                    </div>
                    <label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="公司宣传册">公司宣传册</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="项目案例">项目案例</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="报价函">报价函</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="人员简历">人员简历</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="工作计划书">工作计划书</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="合同">合同</label>
                    <div class="form_label_line"></div>
                    <div class="form_sub_tit">
                        接收资料
                    </div>
                    <label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="项目基地资料">项目基地资料</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="企业客户资料">企业客户资料</label><label class="form_label w50b checkbox"><input type="checkbox" name="remark[]" value="相关研究成果">相关研究成果</label>
                    <div class="form_label_line"></div>
                    <div class="form_sub_tit">
                        其它备注
                    </div>
                    <div class="form_textarea">
                        <input name="other" type="hidden"><p></p>
                    </div>
                </div>
            </div>
            <div class="build_btn paddbox"><div><button type="button" class="sub_btn disabled" disabled>提 交</button></div></div>
            </form>
        </form>
    </div>
</div>
<!-- 弹出框 -->
<div class="Alert operate_alert">
    <div>
        <p class="operate_label_name"><span>其他备注</span></p>
        <textarea name="hb_text"></textarea>
        <div class="btn_box clearboth">
            <a class="btn_close float_l" href="javascript:;">取消</a><button class="btn_alert float_r">确定</button>
        </div>
        <input class="size_input" type="hidden" sid="" tid="">
    </div>
</div>
<include file="Include:javascript" />
<script src="__PUBLIC__/mobile/js/mobiscroll.min.js"></script>
<script>
    $(function(){
        menu();
        $(".form_textarea p").click(function(){
            var txt = $(this).text(),
                other = $('.Alert').fadeIn().find('textarea');
            Mask();
            other.focus().html(txt).val(txt);
            if(other.val!=""){
                other.removeClass("disabled").attr('disabled',false);
            }
        })
        //文本域编辑
        $('.btn_close').click(function(){
            $(this).parents('.Alert').find('textarea').html('').val('');
        })
        $('.btn_alert').click(function(){
            var val = $(this).parents('.Alert').find('textarea').val();
            $(".form_textarea p").html(val);
            $("[name='other']").val(val);
            $('.Mask').fadeOut(function(){
                $(this).remove();
            });
            $(this).parents('.Alert').fadeOut();
            submit();
        })
        $("label").click(function(){
            submit();
        })
        $("[name='data']").change(function(){
            submit();
        })
        //日历
        $('#data').mobiscroll().date({
            theme: 'ios',
            lang: 'zh',
            display: 'bottom'
        });
        //提交
        function submit(){
            var tag = true;
            if($("[name='data']").val()=='日期'){
                tag = false;
                $('.sub_btn').addClass('disabled').attr('disabled',true);
            }
            if($("[name='work_type']:checked").length==0){
                tag = false;
                $('.sub_btn').addClass('disabled').attr('disabled',true);
            }
            if(tag){
                $('.sub_btn').removeClass('disabled').attr('disabled',false);
            }
        }
		$(".sub_btn").click(function(){
            var communicate_add = 'communicate_add',
                pid = "{$project['id']}";
            $.ajax({
                type:"POST",
                async:false,
                dataType:"json",
                data:$("[name='number_validate']").serialize()+"&action="+communicate_add+"&pid="+pid,
                url:"__APP__/Mobile/Project/stage_ajax",
                success:function(data){
                    success_pop(data.status,data.msg,1,'__APP__/Mobile/Project/project_communicate/id/'+"{$project['id']}");
                }
            });
        })
		
    })
</script>
</body>
</html>